###########################################################################
# dropped
# 作者：张立业
# Copyright: 山东科技大学，交通学院。 All right reserved.
#
##########################################################################

import random
from skmath import rd

road_len = 10 * 1000
sim_t = 1000

# def start_sim():
def create_cars():
    """
        路段交通仿真

        返回值：结果的字符串
    """
    sim_rst = ""
    # print("Simulation started")
    sim_rst += "Simulation started\n"

    cars = []
    for i in range(10):

        ## set the start time of the cars
        c.start_time = random.randint(2, 10)

        cars.append(c)

    # print(len(cars), " cars are created.")
    sim_rst += str(len(cars)) + " cars are created." + "\n"
    for c in cars:
        # print("Car name: ", c.id, " position is: ", c.pos, " start time: ", c.start_time)
        sim_rst += "Car name: " + str(c.id) + " position is: " + str(c.pos) + " start time: " + str(c.start_time) + "\n"

    return sim_rst